package com.spider.silence.utils;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 夏茂轩
 * @package com.spider.silence.utils
 * @Date 2017/2/9 22:48
 */
public class SpringUtils {
    private static ClassPathXmlApplicationContext ctx = null;
    public static synchronized ApplicationContext getContext(){
        if(ctx==null){
            ctx=new ClassPathXmlApplicationContext(
                    "classpath:/META-INF/application-context-root.xml");
        }
        return ctx;
    }
}
